package ps.yj.y1j0.business;

import ps.yj.y1j0.data.YJDataObject;
import ps.yj.y1j0.data.YJOrderBy;
import ps.yj.y1j0.data.YJWhere;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
 * data handle interface
 *
 * @author yanjun
 */
public interface YJDataHandler {
    public int insert(YJDataObject data);

    public int update(YJDataObject data);

    public int delete(Object[] idArray);

    public List<Map<String, Object>> select(YJWhere[] whereArray, YJOrderBy[] orderByArray, String[] groupByArray);

    public List<Map<String, Object>> select(String sql, YJWhere[] whereArray, YJOrderBy[] orderByArray, String[] groupByArray);

    public Boolean create(String[] properties);

//    public Boolean alert(YJDataObject data);

    public Boolean drop();

    public Boolean check();
}
